package cn.demoncat.util.lang.entity.data;

import java.util.Objects;

/**
 * 点
 *
 * @author 延晓磊
 * @since 2021年04月10日
 */
public class IntegerPoint {

    private Integer x;

    private Integer y;

    public IntegerPoint() {
        super();
    }

    public IntegerPoint(Integer x, Integer y) {
        this.x = x;
        this.y = y;
    }

    public Integer getX() {
        return x;
    }

    public void setX(Integer x) {
        this.x = x;
    }

    public Integer getY() {
        return y;
    }

    public void setY(Integer y) {
        this.y = y;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        IntegerPoint that = (IntegerPoint) o;
        return Objects.equals(x, that.x) &&
                Objects.equals(y, that.y);
    }

    @Override
    public int hashCode() {
        return Objects.hash(x, y);
    }

    @Override
    public String toString() {
        return "IntegerPoint{" +
                "x=" + x +
                ", y=" + y +
                '}';
    }
}
